projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b9cc86
)
ext4: correctly zero filename
author
Jeroen Hofstee
<
[email protected]
>
Mon, 9 Jun 2014 13:29:00 +0000
(15:29 +0200)
committer
Tom Rini
<
[email protected]
>
Wed, 11 Jun 2014 20:27:05 +0000
(16:27 -0400)
Since ALLOC_CACHE_ALIGN_BUFFER declares a char* for filename
sizeof(filename) is not the size of the buffer. Use the already
known length instead.
cc: Uma Shankar <
[email protected]
>
cc: Manjunatha C Achar <
[email protected]
>
cc: Marek Vasut <
[email protected]
>
Signed-off-by: Jeroen Hofstee <
[email protected]
>
Acked-by: Marek Vasut <
[email protected]
>
fs/ext4/ext4_write.c
patch
|
blob
|
history
diff --git
a/fs/ext4/ext4_write.c
b/fs/ext4/ext4_write.c
index c42add9a7ea95d09543b4938d42668ed03128e73..648a59672c31eec1fcd0b409a185eb079670004a 100644
(file)
--- a/
fs/ext4/ext4_write.c
+++ b/
fs/ext4/ext4_write.c
@@
-840,7
+840,7
@@
int ext4fs_write(const char *fname, unsigned char *buffer,
unsigned int ibmap_idx;
struct ext_filesystem *fs = get_fs();
ALLOC_CACHE_ALIGN_BUFFER(char, filename, 256);
- memset(filename, 0x00,
sizeof(filename)
);
+ memset(filename, 0x00,
256
);
g_parent_inode = zalloc(sizeof(struct ext2_inode));
if (!g_parent_inode)